/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package DTO;

import BLL.BCategory3;
import BLL.BComment;
import java.util.ArrayList;

/**
 *
 * @author Vien-IT
 */
public class Product {
    
    private int productId;
    private String name;
    private String info;
    private String imge;
    private String price;
    private long numberOfProduct;
    private long bestSale;
    private int category3Id;
    private Category3 category3;
    private ArrayList<Comment> comments;

    /**
     * @return the productId
     */
    public int getProductId() {
        return productId;
    }

    /**
     * @param productId the productId to set
     */
    public void setProductId(int productId) {
        this.productId = productId;
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the info
     */
    public String getInfo() {
        return info;
    }

    /**
     * @param info the info to set
     */
    public void setInfo(String info) {
        this.info = info;
    }

    /**
     * @return the imge
     */
    public String getImge() {
        return imge;
    }

    /**
     * @param imge the imge to set
     */
    public void setImge(String imge) {
        this.imge = imge;
    }

    /**
     * @return the price
     */
    public String getPrice() {
        return price;
    }

    /**
     * @param price the price to set
     */
    public void setPrice(String price) {
        this.price = price;
    }

    /**
     * @return the numberOfProduct
     */
    public long getNumberOfProduct() {
        return numberOfProduct;
    }

    /**
     * @param numberOfProduct the numberOfProduct to set
     */
    public void setNumberOfProduct(long numberOfProduct) {
        this.numberOfProduct = numberOfProduct;
    }

    /**
     * @return the category3Id
     */
    public int getCategory3Id() {
        return category3Id;
    }

    /**
     * @param category3Id the category3Id to set
     */
    public void setCategory3Id(int category3Id) {
        this.category3Id = category3Id;
    }

    /**
     * @return the comments
     */
    public ArrayList<Comment> getComments() {
        if(comments == null)
        {
            comments = new BComment().getByProductId(this.productId);
        }
        return comments;
    }

    /**
     * @return the category3
     */
    public Category3 getCategory3() {
        if(category3 == null)
        {
            category3 = new BCategory3().getById(category3Id);
        }
        return category3;
    }

    /**
     * @return the bestSale
     */
    public long getBestSale() {
        return bestSale;
    }

    /**
     * @param bestSale the bestSale to set
     */
    public void setBestSale(long bestSale) {
        this.bestSale = bestSale;
    }

    
    

    
    
}
